# ����ĳһ����������
FROM mcr.microsoft.com/dotnet/aspnet:6.0 AS base

WORKDIR /app
EXPOSE 10086
EXPOSE 80
ENV ASPNETCORE_ENVIRONMENT=Development

FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
WORKDIR /src
COPY ["Niaofei.Web/Niaofei.Web.csproj", "Niaofei.Web/"]
RUN dotnet restore "Niaofei.Web/Niaofei.Web.csproj"
COPY . .
WORKDIR "/src/Niaofei.Web"
RUN dotnet build "Niaofei.Web.csproj" -c Debug -o /app/build

FROM build AS publish
RUN dotnet publish "Niaofei.Web.csproj" -c Debug -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Niaofei.Web.dll"]